-- GENERATED SPELL FOR [Gawanil] --


function spell0_28495(pUnit, Event) --@Corruption,n/a--
pUnit:FullCastSpellOnTarget(39212,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28495', 26000, 1)
end

function spell1_28495(pUnit, Event) --@Curse of Agony,n/a--
pUnit:FullCastSpellOnTarget(14868,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28495', 30000, 1)
end

function spell2_28495(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(20791,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28495', 3000, 1)
end

function spell3_28495(pUnit, Event) --@Siphon Life,Drain--
pUnit:FullCastSpellOnTarget(35195,pUnit:GetRandomPlayer(0))
pUnit:RegisterEvent('Sorts_28495', 12000, 1)
end

function Sorts_28495(pUnit, Event)
local choix_sorts_28495 = math.random(0, 3)
if choix_sorts_28495 == 0 then
pUnit:RegisterEvent('spell0_28495', 1, 1)
end
if choix_sorts_28495 == 1 then
pUnit:RegisterEvent('spell1_28495', 1, 1)
end
if choix_sorts_28495 == 2 then
pUnit:RegisterEvent('spell2_28495', 1, 1)
end
if choix_sorts_28495 == 3 then
pUnit:RegisterEvent('spell3_28495', 1, 1)
end
end

function mob28495_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_28495', math.random(1500, 3000), 1)
end

function mob28495_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28495_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28495_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(28495, 1, 'mob28495_Action')
RegisterUnitEvent(28495, 2, 'mob28495_Leave')
RegisterUnitEvent(28495, 3, 'mob28495_Kill')
RegisterUnitEvent(28495, 4, 'mob28495_Die')
